package com.xh.starter;

import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Name HellowAutoConfiguration
 * @Description
 * @Author wen
 * @Date 2019-06-13
 */
@Configuration
@EnableConfigurationProperties(HellowProperties.class)
@ConditionalOnWebApplication
public class HellowAutoConfiguration {

    @Bean
    public HellowService hellowService(HellowProperties properties){
        return new HellowService(properties);
    }

}
